package be.ikdoeict.ga.population;

import be.ikdoeict.ga.IRandomGenerator;

public class Individual implements IIndividual {
	private double[] genome;
	private IRandomGenerator random;
	
	public double[] getGenome() {
		return genome;
	}
	
	public static IIndividual createIndividual(int size, IRandomGenerator random) {
		Individual individual = new Individual(size, random);
		
		
		return individual;
	}

	private Individual(int size, IRandomGenerator random) {
		this.random = random;
		genome = new double[size];

		initialize();
	}
	
	private void initialize() {
		for (int i = 0; i < genome.length; i++) {
			genome[i] = random.getNextDouble();
		}
	}
	
	public IIndividual crossover(IIndividual individual) {
		// TODO Auto-generated method stub
		return null;
	}

	public double getEvaluation() {
		// TODO Auto-generated method stub
		return 0;
	}

	public void mutation() {
		// TODO Auto-generated method stub

	}

}
